<?php
/**
 * "Visual Paradigm: DO NOT MODIFY THIS FILE!"
 * 
 * This is an automatic generated file. It will be regenerated every time 
 * you generate persistence class.
 * 
 * Modifying its content may cause the program not work, or your work may lost.
 */

/**
 * Licensee: DuKe TeAm
 * License Type: Purchased
 */

class Article_files extends Doctrine_Record {
  public function setTableDefinition() {
    $this->setTableName('article_files');
    $this->hasColumn('afile_id', 'integer', 4, array(
        'type' => 'integer',
        'length' => 4,
        'unsigned' => false,
        'notnull' => true,
        'primary' => true, 
        'autoincrement' => true,
      )
    );
    $this->hasColumn('afire_type', 'integer', 4, array(
        'type' => 'integer',
        'length' => 4,
        'unsigned' => false,
        'default' => '0',
        'notnull' => true,
      )
    );
    $this->hasColumn('afile_createdtime', 'timestamp', 0, array(
        'type' => 'timestamp',
        'length' => 0,
        'notnull' => true,
      )
    );
    $this->hasColumn('afile_updatedtime', 'timestamp', 0, array(
        'type' => 'timestamp',
        'length' => 0,
        'notnull' => true,
      )
    );
    $this->hasColumn('afile_file', 'integer', 4, array(
        'type' => 'integer',
        'length' => 4,
        'unsigned' => false,
        'notnull' => true,
      )
    );
    $this->hasColumn('afile_article', 'integer', 4, array(
        'type' => 'integer',
        'length' => 4,
        'unsigned' => false,
        'notnull' => true,
      )
    );
  }
  
  public function setUp() {
    parent::setUp();
    $this->hasOne('Files as afile_file', array(
        'local' => 'afile_file', 
        'foreign' => 'file_id'
      )
    );
    $this->hasOne('Articles as afile_article', array(
        'local' => 'afile_article', 
        'foreign' => 'art_id'
      )
    );
  }
  
}

?>
